package jianzhi_offer;

public class _46_求1plus2N_ {
    public static void main(String[] args) {
        _46_求1plus2N_ test = new _46_求1plus2N_();
        System.out.println(test.Sum_Solution(4));
    }
    public int Sum_Solution(int n) {
        if(n < 0) return 0;
        int res = n;
        int after = Sum_Solution(n-1);
        if(after != 0) res += after;
        return res;
    }
}
